package com.shareyi.simpleserver.core;

import java.net.Socket;
public abstract class Request {

	protected Socket connection;

    public Request(Socket connection) {
        this.connection = connection;
    }

    public Socket getConnection() {
        return connection;
    }
    
    public String getLocalAddr() {
        return connection.getLocalAddress().getHostAddress();
    }

    public int getLocalPort() {
        return connection.getLocalPort();
    }

    public String getRemoteAddr() {
        return connection.getInetAddress().getHostAddress();
    }

    public int getRemotePort() {
        return connection.getPort();
    }
}
